/**
 * light组件
 */
import React, { PropTypes, Component } from 'react';
import classnames from 'classnames';
import './light.less';

class Light extends Component{
    render(){
        let color = this.props.light.color;
        return(
            <div className="traffic-light">
                <span className={classnames('light',color)} />
                <p>{color}</p>
            </div>
        );
    }
}

Light.propTypes = {
    light: PropTypes.object.isRequired
};

Light.defaultProps = {
    light : {color:'red',time:'4'}
};
export default Light;